$OpenBSD: patch-examples_Makefile_in,v 1.2 2009/06/16 15:31:02 kurt Exp $
--- examples/Makefile.in.orig	Thu Feb  5 20:01:32 2009
+++ examples/Makefile.in	Wed Mar  4 10:31:08 2009
@@ -518,7 +518,7 @@ uninstall-am: uninstall-exampleDATA uninstall-local
 install-data-local:
 	srcdir_cnt=`echo $(srcdir) | wc -c`; \
 	for file in $(ALL_EXAMPLE_FILES); do \
-	  f=`echo $$file | cut -c$$srcdir_cnt-`; \
+	  f=`echo $$file | cut -c$$((srcdir_cnt))-`; \
 	  fdir=`dirname $$f`; \
 	  if test ! -d $(DESTDIR)$(pkgdatadir)/examples/$$fdir; then \
 	    echo "$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/examples/$$fdir"; \
@@ -535,7 +535,7 @@ install-data-local:
 uninstall-local:
 	srcdir_cnt=`echo $(srcdir) | wc -c`; \
 	for file in $(ALL_EXAMPLE_FILES); do \
-	  f=`echo $$file | cut -c$$srcdir_cnt-`; \
+	  f=`echo $$file | cut -c$$(srcdir_cnt))-`; \
 	  echo "rm -f $(DESTDIR)$(pkgdatadir)/examples/$$f"; \
 	  rm -f $(DESTDIR)$(pkgdatadir)/examples/$$f; \
 	done
@@ -546,7 +546,7 @@ uninstall-local:
 dist-hook:
 	srcdir_cnt=`echo $(srcdir) | wc -c`; \
 	for file in $(ALL_EXAMPLE_FILES); do \
-	  f=`echo $$file | cut -c$$srcdir_cnt-`; \
+	  f=`echo $$file | cut -c$$((srcdir_cnt))-`; \
 	  fdir=`dirname $$f`; \
 	  if test ! -d $(distdir)/$$fdir; then \
 	    echo "$(makeinstalldirs) $(distdir)/$$fdir"; \
